function putilaozu(name) {
    this.name = name
    this.age = 20
    this.say = function () {
        console.log(`myname is ${this.name}  年龄 ${this.age}`)
    }
}

putilaozu.prototype.change = function qishierbian() {
    console.log('七十二变')
}
putilaozu.prototype.jump = function jindouyun() {
    console.log('筋斗云')
}

putilaozu.prototype.qita = function qita() {
    console.log('其他')
}
// 桥梁函数四步  官方隐藏的 
// 1 wuong = {} 
// 2 绑定原型节约内存  wukong.__proto__ = putilaozu.prototype 
// 3 wukong.name = 'wukong' wukong.age = 20  wukng.say = say ()
//  return 回去做好的这个对象 给实例 


var wukong = new putilaozu('wukong')
var liuermihou = new putilaozu('liuermihou')


console.log(wukong)


console.log(liuermihou)


 